﻿<%@ Page Language="C#" MasterPageFile="~/Common/Master/FrameMain.master" AutoEventWireup="true"
    Inherits="Admin_Module_List" Title="所有模块" CodeBehind="List.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .disable td, .disable td a
        {
            color: #cccccc;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:HiddenField ID="hidOrders" runat="server" />
    <asp:HiddenField ID="hidHideTrIDs" runat="server" />
    <input id="hiddenClientID" type="hidden" value="<%=hidHideTrIDs.ClientID %>" />
    <div id="toolbar">
        <ul>
            <li><a id="lnkDelete" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/DELETE.gif);">
                &nbsp;</b> 删除</span></a> </li>
            <li><a id="lnkMove" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/move.gif);">
                &nbsp;</b> 移动</span></a> </li>
            <li><a id="lnkCopy" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/copy.gif);">
                &nbsp;</b> 复制</span></a> </li>
            <li><a id="lnkSaveOrders" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/SORT.gif);">
                &nbsp;</b> 排序</span></a> </li>
            <li><a id="lnkStartup" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/startup.gif);">
                &nbsp;</b><asp:Literal ID="Literal2" runat="server" Text="启用"></asp:Literal></span></a></li>
            <li><a id="lnkStop" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/stop.gif);">
                &nbsp;</b><asp:Literal ID="Literal3" runat="server" Text="停用"></asp:Literal></span></a></li>
            <li>
                <asp:Button ID="btnDelete" runat="server" CssClass="hide" Text="删除" CausesValidation="False"
                    OnClick="btnDelete_Click" />
                <input id="btnMove" runat="server" type="button" value="移动" class="hide" />
                <asp:Button ID="btnCopy" runat="server" Text="复制" OnClick="btnCopy_Click" CssClass="hide" />
                <asp:Button ID="btnSaveOrders" runat="server" Text="排序" OnClick="btnSaveOrders_Click"
                    CssClass="hide" />
                <asp:Button ID="btnEnable" CssClass="hide" runat="server" Text="启用" OnClick="btnEnable_Click" />
                <asp:Button ID="btnDisable" CssClass="hide" runat="server" Text="停用" OnClick="btnDisable_Click" />
                <asp:Button ID="btnRefresh" runat="server" OnClick="btnRefresh_Click" Text="Button"
                    CssClass="refresh" /></li>
        </ul>
    </div>
    <div id="head">
        <div class="left">
            <asp:Label ID="Label4" runat="server" Text="警告：删除或修改一个模块将可能导致一些系统故障！" ForeColor="red"
                Font-Bold="true"></asp:Label>
        </div>
    </div>
    <div id="list">
        <asp:HiddenField ID="hidSelectIDs" runat="server" Value="" />
        <table border="0" cellpadding="0" cellspacing="0" width="100%" id="lvList">
            <tr id="lvHeader" runat="server">
                <th class="sp">
                    &nbsp;
                </th>
                <th class="chk">
                    <asp:CheckBox ID="chkSelectAll" runat="server" />
                </th>
                <th>
                    模块名称
                </th>
                <th>
                    模块编码
                </th>
                <th>
                    状态
                </th>
                <th>
                    启动URL
                </th>
                <th>
                    排序
                </th>
            </tr>
            <asp:ListView ID="lv" runat="server" OnItemDataBound="lv_ItemDataBound" EnableViewState="false">
                <LayoutTemplate>
                    <tr id="itemPlaceholder" runat="server">
                    </tr>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr runat="server" class='<%#GetClass(Eval("State")) %>'>
                        <td class="sp">
                            &nbsp;
                        </td>
                        <td class="chk">
                            <asp:CheckBox ID="chkSelect" runat="server" />
                        </td>
                        <td>
                            <asp:Literal ID="litSpace" runat="server" Text='<%# Eval("Space") %>'></asp:Literal>
                            <%#GetIcon(Eval("IconUrl")) %>
                            <asp:HyperLink ID="lnkName" runat="server" NavigateUrl="javascript:go();" Text='<%# Eval("Name") %>'></asp:HyperLink>
                            &nbsp;[<asp:HyperLink ID="hypAdd" runat="server" NavigateUrl="javascript:;">添加子模块</asp:HyperLink>]
                            <asp:HiddenField ID="hidUpperID" runat="server" Value='<%# Eval("UpperID") %>' />
                        </td>
                        <td>
                            <%#Eval("Code") %>&nbsp;
                        </td>
                        <td>
                            <%#(Frame.Lib.Core.Module.ModuleState)(int)Eval("State") %>
                        </td>
                        <td>
                            <%#Eval("NavUrl")%>&nbsp;
                        </td>
                        <td>
                            <asp:TextBox ID="txtOrders" runat="server" Text='<%# Eval("Orders") %>' CssClass="out"></asp:TextBox>
                        </td>
                    </tr>
                </ItemTemplate>
                <EmptyDataTemplate>
                    <tr>
                        <td colspan="7" class="empty">
                            没有模块
                        </td>
                    </tr>
                </EmptyDataTemplate>
            </asp:ListView>
        </table>
    </div>
</asp:Content>
